package com.yrc.test;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * Description: EurekaApplication
 *
 * @author: YeRuichang
 * @version: 1.0
 * Create at: 2018/7/16 下午5:13
 * _
 * Copyright:   Copyright (c)2018
 * Company:     songxiaocai
 * _
 * Modification History:
 * Date              Author      Version     Description
 * ------------------------------------------------------------------
 * 2018/7/16 下午5:13   YeRuichang    1.0
 */
@EnableScheduling
@SpringBootApplication
@EnableAsync(proxyTargetClass = true)
@ComponentScan(value = {
    "com.yrc.test"})
public class SunquanApplication extends SpringBootServletInitializer {


    /**
     * tomcat启动要重写config方法
     * @param builder
     * @return
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(SunquanApplication.class);
    }

    public static void main(String[] args) throws Exception {
        SpringApplication.run(SunquanApplication.class, args);
    }
}